# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sctpscan
pkgver=34.4d44706
pkgrel=3
groups=('blackarch' 'blackarch-recon' 'blackarch-scanner')
pkgdesc='A network scanner for discovery and security.'
url="http://www.p1sec.com/"
arch=('x86_64' 'aarch64')
depends=('glib2')
makedepends=('git')
license=('GPL3')
source=("git+https://github.com/philpraxis/$pkgname.git"
        "$pkgname.patch")
sha512sums=('SKIP'
            '32815bb55db5d78a29bd4f8f8736e72bf729b40decfad2f488a192ecf0aef3ec23ba5ac681be55bdbccc5d4af1f7f9cd6e418d39408895a1148e0ab1296f4471')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  patch -p1 < "$pkgname.patch"
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE COPYING
}

